package com.demo.factory.factoryMethod.pizzaStore.order;

import com.demo.factory.factoryMethod.pizzaStore.pizza.BJCheesePizza;
import com.demo.factory.factoryMethod.pizzaStore.pizza.BJPepperPizza;
import com.demo.factory.factoryMethod.pizzaStore.pizza.Pizza;

public class BJOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("bjPepper")) {
            pizza = new BJPepperPizza();
        } else if (orderType.equals("bjCheese")) {
            pizza = new BJCheesePizza();
        }
        return pizza;
    }
}
